package com.wuyou.web.redis.config.propertise;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

/**
 * Created by glinlf's IDEA
 *
 * @Author glinlf
 * @DATE 2018/1/25 14:54
 * Description: 读取对应redis的配置文件 封装成对象
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Component
@ConfigurationProperties(prefix = "redisDev")
//@PropertySource("classpath:application.properties")
public class DevRedisProperties extends BaseRedisProperties {

    private String hostName;

    private String password;

    private int port;

    private int database; // 数据库序列号0-15

    private int timeOut; // 连接超时时间

    private int maxIdle; // 连接池最大空闲连接

    private int maxTotal; // 连接池最大连接数

    private long maxWaitMillis; // 连接最大等待时间

    private Boolean testOnBorrow = false; // 借出连接是否测试 默认false 比较影响性能

}
